{{Strip}}
{{- $topButtons := call $.Func.TopButtons -}}
{{- $topButtonsLen := len $topButtons -}}
{{- $maxLen := 4 -}}
{{- if gt $topButtonsLen $maxLen -}}
<ul class="nav navbar-nav navbar-right not-nav hidden-xl-up square-buttons-collapse">
<li class="button">
    <a href="javascript:;" onclick="$(this).closest('ul').next('ul.square-buttons').toggleClass('hidden-lg-down')">
        <i class="fa fa-ellipsis-h"></i>
        <span class="bubble circle hidden" id="square-buttons-hasnew"></span>
    </a>
</li>
</ul>
{{- end -}}
<ul class="nav navbar-nav navbar-right not-nav{{if gt $topButtonsLen $maxLen}} hidden-lg-down{{end}} square-buttons">
{{- $.Render $topButtons -}}
</ul>
{{/Strip}}